﻿using RaptorEngine;
using RaptorEngine.Components.Drawable;

namespace OilRigSumoWrestlers.Entities.MenuItems
{
    public abstract class MenuItem:Entity
    {
        private bool selected = false;
        public bool IsSelected { get { return selected; } }
        DrawableText _selectedText;
        DrawableText _deselectedText;

        public MenuItem(DrawableText selectedText, DrawableText deselectedText)
        {
            _selectedText = selectedText;
            _deselectedText = deselectedText;
            Deselect();
        }

        public void Select()
        {
            selected = true;
            AddComponent(_selectedText);
        }

        public void Deselect()
        {
            selected = false;
            AddComponent(_deselectedText);
        }

        abstract public void Execute();
    }
}
